package io.jee.runshan.controller.web;

import io.jee.runshan.domain.WeixinMenuContent;
import io.jee.runshan.service.IWeixinMenuContentService;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/web/weixin/")
public class WebWeixinMenuController {

	private static final String DETAIL = "web/weixin/menu/contentDetail";
	
	@Resource
	private IWeixinMenuContentService menuContentService;
	
	@RequestMapping("menu/content/detail/{id}")
	public ModelAndView detail(@PathVariable String id) {
		WeixinMenuContent content = menuContentService.get(id);
		return new ModelAndView(DETAIL).addObject("content", content);
	}
}
